/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jeff.springWebTestNG.service;

import com.jeff.springWebTestNG.annotation.TellHimGoToHell;
import com.jeff.springWebTestNG.enums.AnnotationDefinedAction;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.springframework.stereotype.Service;

/**
 *
 * @author zhou.zhefu
 */
@Service
public class OperationAnnotatedService implements IOperationAnnotatedService {

    @Override
    @TellHimGoToHell(action= AnnotationDefinedAction.Do)
    public void doSth() {
        try {
            Thread.sleep(500);
        } catch (InterruptedException ex) {
            Logger.getLogger(OperationAnnotatedService.class.getName()).log(Level.SEVERE, null, ex);
        }
        System.out.println("OperationAnnotatedService.doSth()");
    }

    @Override
    @TellHimGoToHell(action= AnnotationDefinedAction.DontDo)
    public void dontDoAnything() {
        try {
            Thread.sleep(500);
        } catch (InterruptedException ex) {
            Logger.getLogger(OperationAnnotatedService.class.getName()).log(Level.SEVERE, null, ex);
        }
        System.out.println("OperationAnnotatedService.dontDoAnything()");
    }
    
}
